<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly" xmlns:page="urn:page">
  <xsl:param name="rowcount"/>
  <xsl:param name="curpage"/>
  <xsl:param name="maxrow"/>
  <xsl:output method="html" encoding="utf-8" />
  <msxsl:script language="javascript" implements-prefix="user">var n=3;
    function PageList(cP,rC,sQuery,mR)    
    {
    var pC=(rC%mR==0)?rC/mR:long(rC/mR)+1;
    var pStr='&lt;a class="total"&gt;共'+rC+'张,第&lt;b&gt;'+cP+'&lt;/b&gt;/'+pC+'页&lt;/a&gt;';
    
    var upStr = '上一页',downStr='下一页';
    cP=long(cP);
    var sP= (cP-n>0)?cP-n:1;
    var eP= (pC>cP+n)?cP+n:pC;
    pStr = pStr +'&lt;a '+((cP>1)?('href="javascript:void(PG.BrowserFile(\'Page='+(cP-1)+sQuery+'\'))"' ):' class="disabled"')+'&gt;' + upStr+'&lt;/a&gt;';
    for (var i=sP;i&lt;=eP;i++)    
    {
    pStr=pStr+'&lt;a '+((i==cP)?'class="current"':'class="pagenum"')+' href="javascript:void(PG.BrowserFile(\'Page='+i+sQuery+'\'))"&gt;'+i+'&lt;\/a&gt;';
    }
    pStr = pStr + '&lt;a '+((cP&lt;pC)?('href="javascript:void(PG.BrowserFile(\'Page='+(cP+1)+sQuery+'\'))" class="block" '):' class="disabled"')+'&gt;' + downStr+'&lt;/a&gt;';
    return pStr;
    }
    function getFileName(FullFileName){
    if(FullFileName=='')return '';
    var i = FullFileName.lastIndexOf('/');
    var s = FullFileName.substring(i+1);
    i = s.indexOf('_')
    return s.substring(i+1);
    }</msxsl:script>
  <xsl:template match="/">
    <xsl:variable name="Query"></xsl:variable>
    <ul class="win">
      <xsl:for-each select="rows/row">
        <li><a href="{F_Url}" target="_blank"><img alt="{user:getFileName(string(F_Url))}" border="0" src="/Thumbnail/{F_Url}" width="98" height="75">
          <xsl:attribute name="title">文件名：<xsl:value-of select="user:getFileName(string(F_Url))"/>&#13;&#10;路径：<xsl:value-of select="F_Url"/> &#13;&#10;上传于<xsl:value-of select="F_UploadTime"/></xsl:attribute>
          </img></a>
          <label><input name="select" type="radio" value="{F_Url}" onclick="$('imgValue').value=this.value" />选定</label>
        </li>
      </xsl:for-each>
    </ul>
    <div class="pagelist"><xsl:value-of select="user:PageList($curpage,$rowcount,$Query,$maxrow)" disable-output-escaping="yes"/></div>
    <input id="imgValue" name="imgValue" type="hidden" value="" />
  </xsl:template>
</xsl:stylesheet>
